import baseConfig from '../../build/config';

const currentEnv = baseConfig.currentEnv;
const currentConfig = baseConfig[currentEnv];
const config = {
  serverProxy: '/serverProxy',
  env: 'dev',
  serverPath: currentConfig.serverPath,
  serverHost: currentConfig.serverHost,
  serverPort: currentConfig.serverPort,
  webSocketProtocol: currentConfig.webSocketProtocol,
  publicPath: currentConfig.publicPath,
  baseRoute: currentConfig.baseRoute,
  authServicePath: currentConfig.authServicePath,
  host: currentConfig.host,
  uiPath: currentConfig.uiPath,
  uploadApi: 'https://gz.file.myqcloud.com/files/v2/1254950508/manager',
  uploadApiProxy: '/uploadApi',
  passwordReg: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[`!@#$%^&*()-_+={}\\[\\]|,<.>/?;:'\"])[A-Za-z\\d`!@#$%^&*()-_+={}\\[\\]|,<.>/?;:'\"]{8,16}$"
};
/** 如果不是开发环境 */
if (currentEnv !== 'dev') {
  config.serverProxy = currentConfig.serverPath;
  /** 除本地开发环境，一律标视为生产,因为需要打包,本地开发环境不打包 */
  config.env = 'prod';
  /** 除本地开发环境，一律不使用代理上传文件 */
  config.uploadApiProxy = config.uploadApi;
}
export default config;
